package com.ruoyi.dgw.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dgw.mapper.VeterinaryDrugMapper;
import com.ruoyi.dgw.domain.VeterinaryDrug;
import com.ruoyi.dgw.service.IVeterinaryDrugService;

/**
 * 兽药Service业务层处理
 * 
 * @author ll
 * @date 2022-01-07
 */
@Service
public class VeterinaryDrugServiceImpl implements IVeterinaryDrugService 
{
    @Autowired
    private VeterinaryDrugMapper veterinaryDrugMapper;

    /**
     * 查询兽药
     * 
     * @param id 兽药主键
     * @return 兽药
     */
    @Override
    public VeterinaryDrug selectVeterinaryDrugById(Long id)
    {
        return veterinaryDrugMapper.selectVeterinaryDrugById(id);
    }

    /**
     * 查询兽药列表
     * 
     * @param veterinaryDrug 兽药
     * @return 兽药
     */
    @Override
    public List<VeterinaryDrug> selectVeterinaryDrugList(VeterinaryDrug veterinaryDrug)
    {
        return veterinaryDrugMapper.selectVeterinaryDrugList(veterinaryDrug);
    }

    /**
     * 新增兽药
     * 
     * @param veterinaryDrug 兽药
     * @return 结果
     */
    @Override
    public int insertVeterinaryDrug(VeterinaryDrug veterinaryDrug)
    {
        return veterinaryDrugMapper.insertVeterinaryDrug(veterinaryDrug);
    }

    /**
     * 修改兽药
     * 
     * @param veterinaryDrug 兽药
     * @return 结果
     */
    @Override
    public int updateVeterinaryDrug(VeterinaryDrug veterinaryDrug)
    {
        return veterinaryDrugMapper.updateVeterinaryDrug(veterinaryDrug);
    }

    /**
     * 批量删除兽药
     * 
     * @param ids 需要删除的兽药主键
     * @return 结果
     */
    @Override
    public int deleteVeterinaryDrugByIds(Long[] ids)
    {
        return veterinaryDrugMapper.deleteVeterinaryDrugByIds(ids);
    }

    /**
     * 删除兽药信息
     * 
     * @param id 兽药主键
     * @return 结果
     */
    @Override
    public int deleteVeterinaryDrugById(Long id)
    {
        return veterinaryDrugMapper.deleteVeterinaryDrugById(id);
    }
}
